<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<s:form action="role">
			<table border="1">
				<tr>
					<td>
						<s:textfield name="role.name" label="权限名" />
					</td>
				</tr>
				<tr>
					<td conspan="2" align="center">
						<s:submit value="查询" method="search" theme="simple" />
						<s:reset value="重置" theme="simple" />
						<s:submit value="新增" method="newRole" theme="simple" />
					</td>
				</tr>
			</table>
			<table border="1">
				<tr>
					<td>
						权限名
					</td>
					<td>
						备注
					</td>
					<td>
						操作
					</td>
				</tr>
				<s:iterator value="roles" id="role">
					<tr>
						<td>
							<s:property value="#role.name" />
						</td>
						<td>
							<s:property value="#role.remarks" />
						</td>
						<td>
							<s:url id="editMenus" action="role!editMenus">
								<s:param name="rid">
									<s:property value="#role.id" />
								</s:param>
							</s:url>
							<s:url id="editTeachers" action="role!editTeachers">
								<s:param name="rid">
									<s:property value="#role.id" />
								</s:param>
							</s:url>
							<s:url id="editStudents" action="role!editStudents">
								<s:param name="rid">
									<s:property value="#role.id" />
								</s:param>
							</s:url>
							<s:a href="%{editMenus}">
								菜单授权
							</s:a>
							<s:a href="%{editTeachers}">
								教职工授权
							</s:a>
							<s:a href="%{editStudents}">
								学生授权
							</s:a>
						</td>
					</tr>
				</s:iterator>
			</table>
		</s:form>
	</body>
</html>